home *** CD-ROM | disk | FTP | other *** search
/ Ahoy 1986 July / Ahoy_Magazine_86-07_1986_Double_L.d64 / c-64 dos (.txt) < prev    next >
Commodore BASIC  |  2022-10-26  |  2KB  |  90 lines

  1. 1 print"[147]":poke53280,5:poke53281,0:poke646,7
  2. 2 print"*************************************"
  3. 3 print"*                                   *"
  4. 4 print"*          cadet's c-64 dos         *"
  5. 5 print"*                                   *"
  6. 6 print"*************************************":print
  7. 10 printtab(3);"a",tab(4)"access directory"
  8. 20 printtab(3);"b",tab(4)"backup files"
  9. 30 printtab(3);"c",tab(4)"consolidate files"
  10. 40 printtab(3);"d",tab(4)"delete files"
  11. 50 printtab(3);"e",tab(4)"error status"
  12. 60 printtab(3);"f",tab(4)"format disk"
  13. 70 printtab(3);"g",tab(4)"give file a new name"
  14. 80 printtab(3);"x",tab(4)"exit to basic":print
  15. 90 print"enter letter signifying your choice"
  16. 99 input"what is your request";x$
  17. 100 print"[147]"
  18. 110 if x$="a" then gosub 200
  19. 120 if x$="b" then gosub 300
  20. 130 if x$="c" then gosub 400
  21. 140 if x$="d" then gosub 500
  22. 150 if x$="e" then gosub 600
  23. 155 if x$="f" then gosub 700
  24. 160 if x$="g" then gosub 800
  25. 190 if x$="x" then gosub 1000
  26. 199 goto 1
  27. 200 rem access directory
  28. 252 open 1,8,0,"$"
  29. 253 get#1,a$,b$
  30. 254 get#1,a$,b$
  31. 255 get#1,a$,b$
  32. 258 c=0:if a$<>""then c=asc(a$)
  33. 260 if b$<>""then c=c+asc(b$)*256
  34. 262 print mid$(str$(c),2);tab(3);
  35. 264 get#1,b$:if st<>0 then 282
  36. 266 if b$<> chr$(34) then 264
  37. 268 get #1,b$:if b$<> chr$(34) then print tab(8);b$;:goto 268
  38. 270 get #1,b$:if b$=chr$(32) then 270
  39. 272 print tab(28);:c$=""
  40. 274 c$=c$+b$:get #1,b$:if b$<>"" then 274
  41. 276 print left$(c$,3)
  42. 280 if st=0 then254
  43. 282 print " blocks free "
  44. 284 close 1:print:print"hit a key to return to menu"
  45. 290 get x$:ifx$=""then 290
  46. 295 return
  47. 300 rem backup file
  48. 310 gosub 2000
  49. 320 open 15,8,15,"c:"+nf$+"="+sf$
  50. 330 close 15:return
  51. 400 rem validate disk
  52. 410 print "warning:open files will be deleted."
  53. 420 print"hit y to validate.":input"continue";q$
  54. 430 if q$<>"y" then return
  55. 440 open 1,8,15,"v0"
  56. 450 close 1:return
  57. 500 rem erase file
  58. 510 input "what files to delete";fi$
  59. 520 input"do you wish to continue";x$
  60. 530 if x$<>"y"then return
  61. 540 open 15,8,15,"s0:"+fi$
  62. 550 close 15:return
  63. 600 rem display error status
  64. 610 open 15,8,15
  65. 620 input#15,a$,b$,c$,d$
  66. 630 print "error status:[160][160]"b$:print:print "error number:[160][160]"a$
  67. 640 print:print"hit a key to return to menu"
  68. 650 get x$:if x$=""then 650
  69. 660 close 15:return
  70. 700 rem format disk
  71. 710 print "insert disk to format"
  72. 720 print "enter disk name":input disk$
  73. 730 print:print "enter extender name":input id$
  74. 740 print"put disk to be erased in drive.":print"press y to continue. ";
  75. 750 input"continue";q$:if q$<>"y" then return
  76. 760 open 15,8,15,"n0:"+disk$+","+id$
  77. 770 close 15:return
  78. 800 rem give file new name
  79. 810 gosub 2000
  80. 820 open 15,8,15,"r:"+nf$+"="+sf$
  81. 830 close 15:return
  82. 1000 rem return to basic
  83. 1010 print "to erase wedge from memory type new."
  84. 1020 print"to return to program type run"
  85. 1099 end
  86. 2000 rem input routine
  87. 2010 input"what source file";sf$
  88. 2020 print:input "what is new file name";nf$
  89. 2030 return
  90.